/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


public class ThreadTest {

    public ThreadTest() {
    }

    public static void main(String[] arguments) {
     
        Example1 t3 = new Example1(10);
        t3.setPriority(t3.MAX_PRIORITY);
        t3.start();
        System.out.println(t3.getPriority());

        Example1 t4 = new Example1(1);
        t4.setPriority(t4.MIN_PRIORITY);
        t4.start();
        System.out.println(t4.getPriority());

        Devil d = new Devil("My Devil", true);
        
        d.setDaemon(d.state);
        d.start();
        System.out.println("Daemon is: " +d.isDaemon());

        Devil d2 = new Devil("Not Daemon", false);
        d2.setDaemon(d2.state);
        d2.start();
        System.out.println(d2.isDaemon());
        System.out.println(d2.isAlive());

        d2.interrupt();
        System.out.println(d2.isAlive());
        System.out.println(d2.isInterrupted());


    }

}
